package cn.befory.config;

import cn.befory.support.AtomicShortUrlGenerator;
import cn.befory.support.ShortUrlGenerator;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class ShortUrlGeneratorConfig {

    @Bean
    public ShortUrlGenerator shortUrlGenerator (SysProperties sysProperties){
        return new AtomicShortUrlGenerator(sysProperties.getStart());
    }
}
